Calling all developers, engineers, and tech professionals! 🗣️
👉 Do you build code for your personal or work projects? Are you looking for technical strategies to boost your efficiency? Do you use GitHub Copilot, or are you open to trying?
If you answered yes to any of the above, this edition of The GitHub Insider is for you! And if you answered no, stick around—you might find these insights interesting anyway. 😉
We’ll explore five ways GitHub engineers use Copilot to increase efficiency, automate repetitive tasks, stay focused, and more.
Hang on tight and let’s go! 🚀
(Shoutout to Holger Staudacher for sharing the initial blog post with us! 👏)
1. Semi-automating repetitive tasks 🌐
One of my favorite bosses once gave me some advice: automate yourself out of a job. Now, I don’t know if I would go that far, but it is true that finding ways to automate repetitive tasks is one of the coolest things that we can do as developers. After all, why do something one hundred times if we can write a script to do it for us!
For instance, at GitHub, teams are often tasked with developing and maintaining several live services, many of which utilize protocol buffers for data communication. During maintenance, the developers on those teams often need to increment ID numbers in the protobuf definitions, as illustrated below:
This is where Copilot can really come in handy. Your AI-powered pair programmer can suggest completions for you, simply by hitting your tab key. Removing the need to manually generate ID numbers can save a lot of time and free you to focus on bigger, more creative, strategic tasks.
Simply set up the string syntax in your editor with Copilot enabled for one definition and tab through the completion suggestions until, voila, it’s done!
(We could get really nerdy and use Copilot to help us write a regular expression to automate this even more, but using a semi-automated approach can leave you in control, while still speeding things up.)
2. Minimize distractions 😵💫
I don’t know about any of you, but I often struggle to stay on task when I’m coding. Sometimes, I’m in the zone and it’s great – but then something will come up and I’ll need to look up how to do something, and I’ll get sucked into a vortex of cat memes and doom scrolling.
Take regular expressions, for example. This is something that developers frequently encounter and need to build. But I don’t always remember exactly what the correct syntax is for a specific task.
Fortunately, regular expressions are something that AI tools are fantastic at helping create and test. Now, I’ll use a real example from a GitHub developer who needed to build a regex to capture a Markdown code block and extract the language identifier.
Now, you could switch to Copilot Chat and ask it to build that regex for you, but that might take you out of your coding flow and lead to more distractions.
Instead, if you want to minimize distractions but still get the benefits, you can formalize the task inside a code comment, like this:
This will prompt Copilot to generate the regular expression as the subsequent statement in your editor:
And as a bonus, you’ve now documented your code, explaining what the regex does to anyone else who might stumble upon it later.
3. Structuring data-related notes 📝
Speaking of documentation, you can use Copilot Chat to assist in documenting your code and solutions too!
For instance, if you’re like me, you’ve probably been in a situation where you need to troubleshoot a specific issue and you want to share the solution with other members of your team. In a perfect world, we would all take the time to write beautiful prose, explaining the solution and process. But more often than not, our solutions are often scattered across notes and code blocks, with little structure.
This is where Copilot Chat can come in clutch. Simply write something like this:
“Organize my notes, structure them, and compile the data in the editor into Markdown tables.”
Within seconds, you’ll have your documentation, all your teammates will be able to dig in and replicate when needed, and you can continue on your day!
You can even use the agents feature in VS Code to use @workspace to collate information from a number of different open documents inside your workspace.
4. Playing and learning 🎨
Acquiring new skills (or improving or enhancing your existing skills) is an important part of being a developer. And Copilot is a great way to enhance, improve and extend your skills!
For instance, are you looking to learn a new language? GitHub’s John Berryman was interested in learning Rust, and he decided to use Copilot Chat to help him out. He wanted to build a program that was capable of converting any numerical input into its written English equivalent. This might seem pretty simple, until you consider that you have to account for complexities like how to handle teen numbers, dealing with naming conventions for tens, the placement of “and” in the output, and so on.
So, John used Copilot Chat to guide him through the process. And luckily for us, he documented his experience! In just 23 minutes, John was able to produce a functional version of this program in Rust, even though he had no prior experience.
You can check out his video below! (This was done using an older version of GitHub Copilot, which is why the UI might look a little different.)
5. Extend Copilot with Extensions ⛓️
We do have one final tip and that is to extend Copilot using extensions. Because after all, wouldn’t it be great if we could use Copilot more places?!
Copilot extensions are available as both GitHub Apps and inside Visual Studio Code. This means that you can leverage the power of things like Copilot Chat but use them with other applications and services.
For instance, you can use the Docker extension to use Copilot to ask information about how you can containerize an application or project inside your repository.
This way, I don’t have to leave my project to get more context or information, I can just use Copilot directly from my editor or repository.
You can even build your own extensions, if you want to go further.
This saves me from having to have several different dashboards or services open; instead, I can do even more of my work all in one place. Bliss!
✨ This newsletter was written by Christina Warren and produced by Gwen Davis. ✨
More to explore 🌎
Attend GitHub Universe 🪐
Experience the world’s fair of software at the historic Fort Mason Center, October 29-20.
Join our GitHub Copilot conversations 📄
Visit our community forum to see what people are saying + offer your own two cents.
Stay updated on GitHub products 📦
Discover the latest ships, launches, and improvements in our Changelog.
Take our open source survey 💡
We’re working with the Linux Foundation and researchers at Harvard University to learn more about how organizations fund open source projects.
Subscribe to our LinkedIn newsletter 🚀
Do your best work on GitHub. Subscribe to our LinkedIn newsletter, Branching Out_.